var me = this;
define(["dojo/_base/declare", this.path + './../4.x/plugins/esri/layers/Echarts3Layer.js'], function (declare, Echarts3Layer) {
    var routerEchartsLayer = declare([Echarts3Layer], {
        setData: function (mapView, mapUtils, layer) {
            var _this = this;
            var options = layer.layer || {};
            var data = options.data;
            var baseLineStyle=options.baseLineStyle||{
                normal: {
                   // color: '#c23531',
                    opacity: 0.6,
                    width: 5
                }
            };
            var moveEffectLineStyle=options.moveEffectLineStyle||{
                constantSpeed: 20,
                show: true,
                trailLength: 0.5,
                symbolSize: 3
            }
            var series = options.series || [{
                type: 'lines',
                coordinateSystem: 'arcgis',
                polyline: true,
                data: data,
                silent: true,
                lineStyle:baseLineStyle ,
                progressiveThreshold: 500,
                progressive: 200
            }, {
                type: 'lines',
                coordinateSystem: 'arcgis',
                polyline: true,
                data: data,
                lineStyle: {
                    normal: {
                        width: 0
                    }
                },
                effect:moveEffectLineStyle ,
                zlevel: 1
            }]

            var option = {
                series: series
            };

            _this.setChartOption(option);
            if (typeof options.callback == 'function') {
                options.callback(layer);
            }
            ;

            function getRouterData(num1, num2) {
                var data = [];
                var x = 0;
                var y = 0;
                for (var i = 0; i < num1; i++) {
                    var entity = [];
                    var preX = 120.09;
                    var preY = 31.9;
                    for (var j = 0; j < num2; j++) {
                        x = preX + j / 10;
                        y = preY + j / 10;
                        entity.push([x, y]);
                    }
                    ;
                    data.push(entity);
                }
                return data;
            }

        },
        isArray: function (data) {
            return Object.prototype.toString.call(data) === "[object Array]";
        }
    })
    return routerEchartsLayer;
});